from django.conf.urls import patterns, include, url

from django.conf.urls.static import static
from django.conf import settings


# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from catalog.views import CatalogView, NewArticleView

urlpatterns = patterns('',
    url(r'^$', CatalogView.as_view(), name='home'),
    url(r'^new$', NewArticleView.as_view(), name='new-article'),    
    url(r'^admin/', include(admin.site.urls), name='admin'),
)

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)